<html xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<body>
	<div th:fragment="container">
		<div class="side-body">

			<!-- 图片弹出层 begin -->
			<div class="imgLayBg"></div>
			<div class="imglayBox">
				<div class="img_html"></div>
				<img class="imgClaose" src="img/images/mke_close.png" width="27"
					height="27" />
			</div>
			<!-- 图片弹出层 end -->

			<div class="row">
				<div class="col-xs-12">
					<div class="card">
						<div class="card-body col-md-11">
							<form class="form-inline">
								<div class="form-group">
									<input type="text" class="form-control" id="authorId"
										placeholder="作者">
								</div>
								<button type="submit" class="btn btn-info">查询</button>
							</form>
						</div>
						<shiro:hasPermission name="add">
							<div class="card-body col-md-1">
								<button type="button" class="btn btn-info" data-toggle="modal"
									data-target="#modalAddImg">+ 添加</button>
							</div>
						</shiro:hasPermission>
					</div>
				</div>
			</div>

			<div class="modal fade modal-info" id="modalAddImg"
				aria-labelledby="imgModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
							<h4 class="modal-title" id="imgModalLabel">添加图片</h4>
						</div>
						<div class="modal-body">
							<div class="col-xs-12">
								<form class="form-horizontal">
									<div class="form-group">
										<label for="theme" class="col-sm-2 control-label">主题</label>
										<div class="col-sm-10">
											<select id="imgTheme" style="width: 100%;">
												<option value="2">南京</option>
												<option value="3">镇江</option>
												<option value="4">青海</option>
											</select>
										</div>
									</div>
									<div class="form-group">
										<div class="col-sm-offset-2 col-sm-10">
											<input type="file" id="fileImg">
										</div>
									</div>
									<div class="form-group">
										<label for="comments" class="col-sm-2 control-label">描述</label>
										<div class="col-sm-10">
											<div>
												<textarea class="form-control" rows="3" id="commentImg"></textarea>
											</div>
										</div>
									</div>
								</form>
							</div>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default"
								data-dismiss="modal">取消</button>
							<button type="button" class="btn btn-info" id="submitUpload">确定</button>
						</div>
					</div>
				</div>
			</div>

			<div class="row" th:each="pt, ptStat:${photoThemes}">
				<div class="col-xs-12">
					<div class="card">
						<div class="card-header">
							<div class="card-title">
								<div class="title" th:text="${pt.theme}"></div>
							</div>
						</div>
						<!-- card begin -->
						<div class="card-body">
							<div>
								<div class="row no-margin">
									<div class="imgShow col-xs-6 col-md-3"
										th:each="photo, photoStat:${pt.photoList}">
										<img th:src="@{${photo.path}}"
											th:attr="data-original=${photo.path}"
											class="lazy img-responsive" />
										<span class="hidden">
											<img th:src="@{${photo.path}}" />
										</span>
									</div>
								</div>
							</div>
						</div>
						<!-- card end -->
					</div>
				</div>
			</div>

		</div>
	</div>
</body>
</html>